project(file_management)
cmake_minimum_required(VERSION 3.1)
set(CMAKE_BUILD_TYPE "Debug")

add_compile_options(-std=c++17)
aux_source_directory(. DIRSRCS)
find_package(glog 0.6.0 REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/mysql_client)
include_directories(${PROJECT_SOURCE_DIR}/xthread_pool)
include_directories(${PROJECT_SOURCE_DIR}/xthread_pool/work_thread)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/events/)
include_directories(${PROJECT_SOURCE_DIR}/events/events_base)
include_directories(${PROJECT_SOURCE_DIR}/events/events_config)
include_directories(${PROJECT_SOURCE_DIR}/events/events_cb)
include_directories(${PROJECT_SOURCE_DIR}/xthread_pool/thread_task)
include_directories(${PROJECT_SOURCE_DIR}/xthread_pool/task_cmd)
include_directories(${PROJECT_SOURCE_DIR}/xthread_pool/work_thread/thread_list)




add_subdirectory(${PROJECT_SOURCE_DIR}/xthread_pool/work_thread)
add_subdirectory(${PROJECT_SOURCE_DIR}/events/events_cb)
add_subdirectory(${PROJECT_SOURCE_DIR}/events/events_base)
add_subdirectory(${PROJECT_SOURCE_DIR}/xthread_pool/thread_task)
add_subdirectory(${PROJECT_SOURCE_DIR}/events)
add_subdirectory(${PROJECT_SOURCE_DIR}/xthread_pool/task_cmd)
add_subdirectory(${PROJECT_SOURCE_DIR}/xthread_pool/work_thread/thread_list)

add_subdirectory(mysql_client)
add_subdirectory(xthread_pool)
add_executable(${PROJECT_NAME} ${DIRSRCS})
target_link_libraries(${PROJECT_NAME} glog::glog pthread crypto event event_pthreads hiredis mysqlclient xthread_pool work_thread
pthread events_config events_base events_cb thread_task task_cmd thread_list)

#target_link_libraries(${PROJECT_NAME} glog::glog pthread event_pthreads event mysql_client mysqlclient xthread_pool work_thread events_config events_cb events_base)